package com.qinghe.plant.timertask;

import java.util.Date;
import java.util.TimerTask;

import com.qinghe.plant.controller.PocessController;
import com.qinghe.plant.controller.OrderController;
import com.qinghe.plant.controller.ScadaController;


public class DeleteDataTask extends TimerTask {
	@Override
	public void run() {
		Date now=new  Date();
		Date last=new Date(now.getTime()-90*24*60*60*1000) ;
		//清除一次production的数据
		OrderController productionController=new OrderController();
		productionController.DeleteData(last);
		//清除一次Pocess的数据
		PocessController pocessController=new PocessController();
		pocessController.DeleteData(last);
		//清除一次scada的数据
		ScadaController scadaController=new ScadaController();
		scadaController.DeleteData(last);
	}
}
